﻿using GC_FFW.Common.Abstractions.Interfaces.Helpers;
using GC_FFW.SoccerfameParser.Abstractions.Interfaces.Factories;
using GC_FFW.SoccerfameParser.Abstractions.Interfaces.Repositories;
using GC_FFW.SoccerfameParser.Repositories;

namespace GC_FFW.SoccerfameParser.Factories
{
	public class RepositoryFactory : IRepositoryFactory
	{
		#region Variables

		private readonly IXmlSerializerService _xmlSerializerService;

		#endregion

		#region Constructors

		public RepositoryFactory(IXmlSerializerService xmlSerializerService)
		{
			_xmlSerializerService = xmlSerializerService;
		}

		#endregion

		#region IRepositoryFactory Members

		public INamesRepository Create(string filePath)
		{
			return new NamesRepository(_xmlSerializerService, filePath);
		}

		#endregion
	}
}
